package com.itheima.in;

import java.io.FileInputStream;
import java.io.IOException;

public class Demo02 {

    public static void main(String[] args) throws IOException {
        //创建对象
        FileInputStream fis = new FileInputStream("day12\\a.txt");

        while (true) {
            //调用方法
            int read = fis.read();
            System.out.println((char)read);
            if(read==-1){
                break;
            }
        }
        int read;
      while ((read=fis.read())!=-1){
          System.out.println(read);
      }
        //释放资源
        fis.close();

    }
}
